import java.util.LinkedList;

/**
 * 
 * @author Denzel Richmond
 * REMEMBER, MINION HAS ALL THE VARIABLES AND ALL THE METHODS OF ENEMY
 */
public class Minion extends Enemy{

	float engFreq;  //percentage of attacks that should be energy based
	float meleeFreq;//percentage of attacks that should be melee based
	int state;      //the state of this character, 0: none(free),1: melee attack,2 eng attack,3: defend
	Player[] player;  //a list of all Players that are close enough for the enemy to attack
	/**
	 * Initializes this character's instance variables, state should be set to 0
	 * @param maxLP the max life points of this character
	 * @param Point p the point that this character's currentPosition variable should be set to
	 * @param damage the value the damage variable shoule be set to
	 * 
	 */
	public Minion(int characterNumber)
	{
		this.characterNumber = characterNumber;
		loadSprites();  //make sure this is the last line.
	}
	public void setEngFrequency(float engFreq)
	{
		
	}
	public void setMeleeFrequency(float meleeFreq)
	{
		
	}
	public void setPlayerList(LinkedList<Player>player)
	{
		
	}
	/**
	 * sets this character's direction by calculating wich way he needs to go
	 * to reach the desired point
	 * @param p desired point, where the character is trying to go
	 */
	private void setDirection(Point p)
	{
		
	}
	/**
	 * this is the main method of the enemy class.  Decide which value to set the
	 * state variable to using logic statements.  Then decide what to make the enemy do
	 * when he is in each of those states.  Be sure to set state back to 0 when the enemy
	 * leaves one of his other states
	 */
	public void update()
	{
		sendMovementPacket(new MovementPacket(true,0,Character.Speeds.MOVEMENT)); //example of how to make the enemy move right
		switch(state)
		{
		//here you should decide which value you should set state to next.  You can make more states
		//if you want.  I don't know what else you'd add though.  Just try to keep the number of
		//states to a minimum.  Like, less than 10.
		case 0:  
			
			//here you should move the enemy to the character, and when he is close enough
			//we'll add in the next part later.  Use setDirection(Point p)
		case 1:  
			
			//here you should stop his movement, and make him create a energy attack aimed at
			//a player from playerList.  Make sure he's facing where he's aiming.
			//make the energyAttack a wave for now.  set this character's wave variable to the
			//attack you create.
		case 2:
			
			//don't worry about it.  Just make it set state back to 0 for now
		case 3:
		
			
		}
			
		
	}
}
